const app = getApp()
const db = wx.cloud.database({
  env: 'cloud1-2g6vpgs796710242'
})
var collection = ""

Page({
  data: {
    bookInfo:[],
    gather:[]
  },

  onLoad: function (options) {
    console.log("bid",JSON.parse(decodeURIComponent(options.aiminfo)))
    var bi = JSON.parse(decodeURIComponent(options.aiminfo))
    this.setData({
      bookInfo: bi
    })
    db.collection("DS_risk")
    .get()
    .then(res=>{
      console.log("数据集",res)
      this.setData({
        gather:res.data
      })
    })
    .catch(err=>{
      console.log(err)
    })
  },

  gobpage(e) {
    console.log(e)
    var sid = e.currentTarget.dataset.id
      wx.navigateTo({
        url: '../bpage/bpage?id=' + sid
      })
  },

  onShareAppMessage: function () {

  },
})